#!/bin/bash
export access_token="$(cat $Gitee_Repo/etc/access_token)"
export owner=$1
export repo=$2
export page=$3
export per_page=$4
if [ -n "$1" ];then
{
    if [ -n "$2" ];then
    {
        if [ -n "$3" ];then
        {
            if [ -n "$4" ];then
            {
             curl -X GET --header "Content-Type: application/json;charset=UTF-8" "https://gitee.com/api/v5/repos/${owner}/${repo}/stargazers?access_token=${access_token}&page=${page}&per_page=${per_page}"
             exit 0
            }
            fi
        }
        fi
    }
fi
}
fi
echo -e "
用法: gitee vstar [仓库所属空间地址(企业、组织或个人的地址path)(无需gitee.com/)] [仓库路径(path)] [当前的页码] [每页的数量，最大为 100]
"
exit 1
